// ********************************************************************************************
// Este archivo fuente es propiedad de Feria de Remates S.R.L. de C.V. Prohibida su copia o uso
// sin autorización explícita.
// This source file is propietary to Feria de Remates S.R.L. de C.V. May not be used or copied
// without explicit authorization.
// ********************************************************************************************/
package com.feriaderemates.dao.user;

import com.feriaderemates.domain.userAccount.EmailCommunicationSettings;
import com.feriaderemates.domain.userAccount.UserAddress;
import java.util.List;

/**
 *
 * @author Oscar García
 */
public interface UserPreferencesAndSettingsDaoInterface {

    /**
     * Updates user's address. Updates all the fields
     *
     * @param address the new address
     */
    public void updateUserAddress(UserAddress address);

    /**
     * Gets all the addresses associated with an user
     *
     * @param userId the user id
     * @return the user's addresses
     */
    public List<UserAddress> getUserAddresses(int userId);

    /**
     * Gets user's email communication settings.
     *
     * @param userId the user id
     */
    public EmailCommunicationSettings getEmailCommunicationSettings(int userId);

    /**
     * Sets user's email communication settings. If already exist in the table
     * they will be replaced.
     *
     * @param settings the settings to set
     */
    public void setEmailCommunicationSettings(EmailCommunicationSettings settings);

    /**
     * Adds a user's address. Sets all the fields in the bean
     *
     * @param address the new address
     */
    public void addUserAddress(UserAddress address);
    
    /**
     * Deletes an address identified by addressId
     * 
     * @param addressId the address id
     */
    public void deleteUserAddress(int addressId);
}
